add

fun <E : Widget> add(id: String, element: E, parent: String, vararg positions: LayoutWidget.Position): LayoutWidget

Adds an element, keyed off a manually defined parent element.

NOTE: "element" here refers to a piece of a layout. "Elements" do NOT necessarily have to be minecraft Element

Return

Builder - this builder for further use

Author

fzzyhmstrs

Since

0.6.0

Parameters

E
  • Any subclass of Widget

id

String - the id of this element, used when an element refers to this one as a parent

element

E - the widget

parent

String - the id of the parent to key layout of this new element off of.

positions

vararg Position - defines the layout arrangement of this element compared to its parent. See the doc for Position for details.


fun <E : Widget> add(id: String, element: E, vararg positions: LayoutWidget.Position): LayoutWidget

Adds an element, automatically keyed off the last added element (or "" if this is the first added element).

Return

Builder - this builder for further use

Author

fzzyhmstrs

Since

0.6.0

Parameters

E
  • Any subclass of Widget

id

String - the id of this element, used when an element refers to this one as a parent

element

E - the widget

positions

vararg Position - defines the layout arrangement of this element compared to its parent. See the doc for Position for details.